﻿using System;
using System.Collections.Generic;
using System.Text;
using DaiKin.DBDataAccessLib.Helper;
using System.Data;

namespace DBDataAccessLib
{
    public abstract class GeneralDataAccess
    {
        public static string SystemDate()
        {
            if (DBHelperFactory.DbName == DBType.SqlServer) return DateTime.Now.ToString("yyyy.M");
            object result = OracleHelper.ExecuteScalar(
                OracleHelper.ConnectionStringLocalTransaction,
                CommandType.Text,
                SqlProvider.GetDBTime
                );
            return result == null ? DateTime.Now.ToString("yyyy.M") : result.ToString();
        }
    }
}
